{% extends "../base.html" %}
{% block title %}{{block.super}}{% block page_title %}发表文章{% endblock %}{% endblock %}
{% block css %}{{block.super}}
	<link href="{{APPSTATIC}}css/publish.css" rel="stylesheet">
{% endblock %}
{% block main %}
	<h1 class="page_title">{{self.page_title}}</h1>
	<form method="post">
		{%if data%}<input type="hidden" name="id" value="{{data.id}}">{%endif%}
		<div class="blog-control">
			<input type="text" name="title" placeholder="请输入标题（必填）" value="{{data.title}}" required>
		</div>
		<div class="blog-control blog-tags">
			<input type="text" name="tags" placeholder="请输入标签（,分隔）" value="{{data.tags}}" required>
		</div>
		<div class="blog-control blog-desc">
			<input type="text" name="description" placeholder="请输入摘要" value="{{data.description}}" required>
		</div>
		{% include "./editor.html" %}
		<div class="submitBtn">
			<button name="status" class="save" value="0">保存草稿</button>
			<button name="status" class="publish" value="1">发表文章</button>
		</div>
	</form>
{% endblock %}